package com.ray.basic;

public class NumberTest {

    /**
     *  byte    Byte
     *  sort    Sort
     *  int     Integer
     *  long    Long
     *  float   Float
     *  double  Double
     *  char    Character
     *  boolean Boolean
     *
     *  装箱是基本类型转为对应包装类
     *  拆箱是包装类转为对应基本类型
     */

    public static void main(String[] args) {

        //装箱
        Byte byt = new Byte("1");
        //拆箱
        byte b = byt.byteValue();
        System.out.println(b);

        //拆箱方法 字符串转基本数据类型 parse*   Character没有该方法
        int i2 = Integer.parseInt("3");

        String str = "你好，大哥哥！";
        char[] chars = str.toCharArray();
        StringBuilder builder = new StringBuilder();
        for (int i = chars.length-1; i >= 0; i--) {
            builder.append(chars[i]);
        }
        System.out.println(builder.toString());
    }

}
